import React, { Suspense } from 'react'
import ReactDOM from 'react-dom/client'
import '@/style/index.scss'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { BrowserRouter as Router }  from "react-router-dom"
import { Provider as StoreProvider} from 'react-redux'
import Store from '@/store'
import WebLoading from 'components/WebLoading'
import progress from '@/utils/progress'
import '@/lang'
import storage from '@/utils/storage'
import '@/assets/svg'

window.progress = progress
window.storage = storage
console.log(process.env.REACT_APP_BASE_URL)

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(
  <StoreProvider store={Store}>
    <Suspense fallback={<WebLoading />}>
      <Router>
        <App />
      </Router>
    </Suspense>
  </StoreProvider>
)

reportWebVitals()
